<?php

namespace Wilead\IArtistBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;

/**
 * Class FriendRequest
 * @package Wilead\IArtistBundle\Entity
 * @ORM\Table(
 *      uniqueConstraints={
 *          @ORM\UniqueConstraint(name="unique_record", columns={"Uid", "Tid"})
 *      }
 * )
 * @ORM\Entity(repositoryClass="Wilead\IArtistBundle\Repository\FriendRequestRepository")
 */
class FriendRequest
{
    /**
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumn(name="Uid", referencedColumnName="id", nullable=false)
     * */
    private $Uid;

    /**
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumn(name="Tid", referencedColumnName="id", nullable=false)
     * */
    private $Tid;

    /**
     * @Gedmo\Timestampable(on="create")
     * @ORM\Column(type="datetime")
     */
    private $created;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set created
     *
     * @param \DateTime $created
     * @return FriendRequest
     */
    public function setCreated($created)
    {
        $this->created = $created;
    
        return $this;
    }

    /**
     * Get created
     *
     * @return \DateTime 
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Set Uid
     *
     * @param \Wilead\IArtistBundle\Entity\User $uid
     * @return FriendRequest
     */
    public function setUid(\Wilead\IArtistBundle\Entity\User $uid)
    {
        $this->Uid = $uid;
    
        return $this;
    }

    /**
     * Get Uid
     *
     * @return \Wilead\IArtistBundle\Entity\User 
     */
    public function getUid()
    {
        return $this->Uid;
    }

    /**
     * Set Tid
     *
     * @param \Wilead\IArtistBundle\Entity\User $tid
     * @return FriendRequest
     */
    public function setTid(\Wilead\IArtistBundle\Entity\User $tid)
    {
        $this->Tid = $tid;
    
        return $this;
    }

    /**
     * Get Tid
     *
     * @return \Wilead\IArtistBundle\Entity\User 
     */
    public function getTid()
    {
        return $this->Tid;
    }
}